home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / A / 003. SillyBalls.cpt / SillyBalls.c < prev    next >
MacBinary  |  1988-08-01  |  9.3 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Aug 1 17:07:53 1988, modified Mon Aug 1 17:07:53 1988, creator 'MPS ', type ASCII, 8947 bytes "SillyBalls.c" , at 0x2373 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 53 69 6c 6c 79 42 | 61 6c 6c 73 2e 63 00 00 |..SillyB|alls.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 22 f3 00 | 00 01 7e 9f 1a 8e 29 9f |....."..|..~...).|
|00000060| 1a 8e 29 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..).....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f3 39 00 00 |........|.....9..|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000d0| 0d 23 0d 23 09 4d 61 63 | 69 6e 74 6f 73 68 20 44 |.#.#.Mac|intosh D|
|000000e0| 65 76 65 6c 6f 70 65 72 | 20 54 65 63 68 6e 69 63 |eveloper| Technic|
|000000f0| 61 6c 20 53 75 70 70 6f | 72 74 0d 23 0d 23 09 53 |al Suppo|rt.#.#.S|
|00000100| 69 6d 70 6c 65 20 43 6f | 6c 6f 72 20 51 75 69 63 |imple Co|lor Quic|
|00000110| 6b 44 72 61 77 20 53 61 | 6d 70 6c 65 20 41 70 70 |kDraw Sa|mple App|
|00000120| 6c 69 63 61 74 69 6f 6e | 0d 23 0d 23 09 53 69 6c |lication|.#.#.Sil|
|00000130| 6c 79 42 61 6c 6c 73 0d | 23 0d 23 09 53 69 6c 6c |lyBalls.|#.#.Sill|
|00000140| 79 42 61 6c 6c 73 2e 63 | 09 2d 09 43 20 53 6f 75 |yBalls.c|.-.C Sou|
|00000150| 72 63 65 0d 23 0d 23 09 | 43 6f 70 79 72 69 67 68 |rce.#.#.|Copyrigh|
|00000160| 74 20 a9 20 31 39 38 38 | 20 41 70 70 6c 65 20 43 |t . 1988| Apple C|
|00000170| 6f 6d 70 75 74 65 72 2c | 20 49 6e 63 2e 0d 23 09 |omputer,| Inc..#.|
|00000180| 41 6c 6c 20 72 69 67 68 | 74 73 20 72 65 73 65 72 |All righ|ts reser|
|00000190| 76 65 64 2e 0d 23 0d 23 | 09 56 65 72 73 69 6f 6e |ved..#.#|.Version|
|000001a0| 73 3a 09 31 2e 30 09 09 | 09 09 09 38 2f 38 38 0d |s:.1.0..|...8/88.|
|000001b0| 23 0d 23 09 43 6f 6d 70 | 6f 6e 65 6e 74 73 3a 09 |#.#.Comp|onents:.|
|000001c0| 53 69 6c 6c 79 42 61 6c | 6c 73 2e 70 09 09 41 75 |SillyBal|ls.p..Au|
|000001d0| 67 75 73 74 20 31 2c 20 | 31 39 38 38 0d 23 09 09 |gust 1, |1988.#..|
|000001e0| 09 09 53 69 6c 6c 79 42 | 61 6c 6c 73 2e 63 09 09 |..SillyB|alls.c..|
|000001f0| 41 75 67 75 73 74 20 31 | 2c 20 31 39 38 38 0d 23 |August 1|, 1988.#|
|00000200| 09 09 09 09 50 53 69 6c | 6c 79 42 61 6c 6c 73 2e |....PSil|lyBalls.|
|00000210| 6d 61 6b 65 09 41 75 67 | 75 73 74 20 31 2c 20 31 |make.Aug|ust 1, 1|
|00000220| 39 38 38 0d 23 09 09 09 | 09 43 53 69 6c 6c 79 42 |988.#...|.CSillyB|
|00000230| 61 6c 6c 73 2e 6d 61 6b | 65 09 41 75 67 75 73 74 |alls.mak|e.August|
|00000240| 20 31 2c 20 31 39 38 38 | 0d 23 0d 23 09 54 68 69 | 1, 1988|.#.#.Thi|
|00000250| 73 20 69 73 20 61 20 76 | 65 72 79 20 73 69 6d 70 |s is a v|ery simp|
|00000260| 6c 65 20 73 61 6d 70 6c | 65 20 70 72 6f 67 72 61 |le sampl|e progra|
|00000270| 6d 20 74 68 61 74 20 64 | 65 6d 6f 6e 73 74 72 61 |m that d|emonstra|
|00000280| 74 65 73 20 68 6f 77 20 | 74 6f 20 75 73 65 20 43 |tes how |to use C|
|00000290| 6f 6c 6f 72 20 0d 23 09 | 51 75 69 63 6b 44 72 61 |olor .#.|QuickDra|
|000002a0| 77 2e 20 20 49 74 20 69 | 73 20 61 62 6f 75 74 20 |w. It i|s about |
|000002b0| 74 77 6f 20 70 61 67 65 | 73 20 6f 66 20 63 6f 64 |two page|s of cod|
|000002c0| 65 2c 20 61 6e 64 20 64 | 6f 65 73 20 6e 6f 74 68 |e, and d|oes noth|
|000002d0| 69 6e 67 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 70 |ing more| than op|
|000002e0| 65 6e 0d 23 09 61 20 63 | 6f 6c 6f 72 20 77 69 6e |en.#.a c|olor win|
|000002f0| 64 6f 77 20 61 6e 64 20 | 64 72 61 77 20 72 61 6e |dow and |draw ran|
|00000300| 64 6f 6d 6c 79 20 63 6f | 6c 6f 72 65 64 20 6f 76 |domly co|lored ov|
|00000310| 61 6c 73 20 69 6e 20 74 | 68 65 20 77 69 6e 64 6f |als in t|he windo|
|00000320| 77 2e 0d 23 09 0d 23 09 | 54 68 65 20 70 75 72 70 |w..#..#.|The purp|
|00000330| 6f 73 65 20 69 73 20 74 | 6f 20 73 68 6f 77 20 68 |ose is t|o show h|
|00000340| 6f 77 20 74 6f 20 67 65 | 74 20 73 6f 6d 65 20 69 |ow to ge|t some i|
|00000350| 6e 69 74 69 61 6c 20 72 | 65 73 75 6c 74 73 20 77 |nitial r|esults w|
|00000360| 69 74 68 20 43 6f 6c 6f | 72 20 51 75 69 63 6b 44 |ith Colo|r QuickD|
|00000370| 72 61 77 2e 0d 23 09 49 | 74 20 69 73 20 61 20 63 |raw..#.I|t is a c|
|00000380| 6f 6d 70 6c 65 74 65 20 | 70 72 6f 67 72 61 6d 20 |omplete |program |
|00000390| 61 6e 64 20 69 73 20 76 | 65 72 79 20 73 68 6f 72 |and is v|ery shor|
|000003a0| 74 20 74 6f 20 62 65 20 | 61 73 20 63 6c 65 61 72 |t to be |as clear|
|000003b0| 20 61 73 20 70 6f 73 73 | 69 62 6c 65 2e 0d 23 09 | as poss|ible..#.|
|000003c0| 0d 23 09 49 74 20 64 6f | 65 73 20 6e 6f 74 20 68 |.#.It do|es not h|
|000003d0| 61 76 65 20 61 6e 20 45 | 76 65 6e 74 20 4c 6f 6f |ave an E|vent Loo|
|000003e0| 70 2e 20 20 49 74 20 69 | 73 20 6e 6f 74 20 66 75 |p. It i|s not fu|
|000003f0| 6c 6c 79 20 66 75 6e 63 | 74 69 6f 6e 61 6c 20 69 |lly func|tional i|
|00000400| 6e 20 74 68 65 20 73 65 | 6e 73 65 20 74 68 61 74 |n the se|nse that|
|00000410| 0d 23 09 69 74 20 64 6f | 65 73 20 6e 6f 74 20 64 |.#.it do|es not d|
|00000420| 6f 20 61 6c 6c 20 74 68 | 65 20 74 68 69 6e 67 73 |o all th|e things|
|00000430| 20 79 6f 75 20 77 6f 75 | 6c 64 20 65 78 70 65 63 | you wou|ld expec|
|00000440| 74 20 61 20 77 65 6c 6c | 20 62 65 68 61 76 65 64 |t a well| behaved|
|00000450| 20 4d 61 63 69 6e 74 6f | 73 68 20 0d 23 09 70 72 | Macinto|sh .#.pr|
|00000460| 6f 67 72 61 6d 20 74 6f | 20 64 6f 2c 20 6c 69 6b |ogram to| do, lik|
|00000470| 65 20 73 69 7a 65 20 74 | 68 65 20 77 69 6e 64 6f |e size t|he windo|
|00000480| 77 20 6e 61 74 75 72 61 | 6c 6c 79 2c 20 68 61 76 |w natura|lly, hav|
|00000490| 65 20 61 6e 20 65 76 65 | 6e 74 20 6c 6f 6f 70 2c |e an eve|nt loop,|
|000004a0| 20 75 73 65 20 6d 65 6e | 75 73 2c 20 0d 23 09 65 | use men|us, .#.e|
|000004b0| 74 63 2e 0d 23 0d 23 09 | 53 65 65 20 53 61 6d 70 |tc..#.#.|See Samp|
|000004c0| 6c 65 20 61 6e 64 20 54 | 45 53 61 6d 70 6c 65 20 |le and T|ESample |
|000004d0| 66 6f 72 20 74 68 65 20 | 67 65 6e 65 72 61 6c 20 |for the |general |
|000004e0| 73 74 72 75 63 74 75 72 | 65 20 61 6e 64 20 4d 75 |structur|e and Mu|
|000004f0| 6c 74 69 46 69 6e 64 65 | 72 20 74 65 63 68 6e 69 |ltiFinde|r techni|
|00000500| 71 75 65 73 20 74 68 61 | 74 0d 23 09 77 65 20 72 |ques tha|t.#.we r|
|00000510| 65 63 6f 6d 6d 65 6e 64 | 20 74 68 61 74 20 79 6f |ecommend| that yo|
|00000520| 75 20 75 73 65 20 77 68 | 65 6e 20 62 75 69 6c 64 |u use wh|en build|
|00000530| 69 6e 67 20 61 20 6e 65 | 77 20 61 70 70 6c 69 63 |ing a ne|w applic|
|00000540| 61 74 69 6f 6e 2e 0d 23 | 0d 2d 2d 2d 2d 2d 2d 2d |ation..#|.-------|
|00000550| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000560| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000590| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0d 0d 2f 2a 09 0d 09 |-------*|/../*...|
|000005a0| 56 65 72 73 69 6f 6e 20 | 31 2e 30 3a 09 36 2f 32 |Version |1.0:.6/2|
|000005b0| 2f 38 38 0d 09 09 09 09 | 09 37 2f 32 30 2f 38 38 |/88.....|.7/20/88|
|000005c0| 09 20 44 4a 42 09 43 6f | 6e 76 65 72 74 65 64 20 |. DJB.Co|nverted |
|000005d0| 74 6f 20 43 0d 09 0d 09 | 70 75 72 70 6f 73 65 09 |to C....|purpose.|
|000005e0| 09 54 6f 20 64 65 6d 6f | 6e 73 74 72 61 74 65 20 |.To demo|nstrate |
|000005f0| 61 20 73 69 6d 70 6c 65 | 20 63 6f 6c 6f 72 20 41 |a simple| color A|
|00000600| 70 70 20 75 73 69 6e 67 | 20 43 6f 6c 6f 72 20 51 |pp using| Color Q|
|00000610| 75 69 63 6b 44 72 61 77 | 2e 0d 09 09 09 09 09 09 |uickDraw|........|
|00000620| 49 74 20 64 72 61 77 73 | 20 63 6f 6c 6f 72 65 64 |It draws| colored|
|00000630| 20 62 61 6c 6c 73 20 69 | 6e 20 61 20 63 6f 6c 6f | balls i|n a colo|
|00000640| 72 20 77 69 6e 64 6f 77 | 2c 20 74 68 65 6e 20 75 |r window|, then u|
|00000650| 73 65 73 20 63 6f 6c 6f | 72 65 64 0d 09 09 09 09 |ses colo|red.....|
|00000660| 09 09 74 65 78 74 20 69 | 6e 76 65 72 74 65 64 20 |..text i|nverted |
|00000670| 69 6e 20 74 68 65 20 62 | 61 6c 6c 2e 20 20 54 68 |in the b|all. Th|
|00000680| 65 20 62 61 6c 6c 20 6c | 6f 63 61 74 69 6f 6e 20 |e ball l|ocation |
|00000690| 61 6e 64 20 63 6f 6c 6f | 72 20 69 73 20 52 61 6e |and colo|r is Ran|
|000006a0| 64 6f 6d 2e 0d 09 09 09 | 09 09 09 0d 09 09 09 09 |dom.....|........|
|000006b0| 09 09 54 68 69 73 20 70 | 72 6f 67 72 61 6d 20 77 |..This p|rogram w|
|000006c0| 61 73 20 77 72 69 74 74 | 65 6e 20 62 79 20 42 6f |as writt|en by Bo|
|000006d0| 33 62 20 4a 6f 68 6e 73 | 6f 6e 2c 20 31 2f 38 38 |3b Johns|on, 1/88|
|000006e0| 2e 0d 09 09 09 09 09 09 | 0d 09 09 09 09 09 09 54 |........|.......T|
|000006f0| 68 65 20 69 6e 76 65 72 | 74 65 64 20 42 6f 62 20 |he inver|ted Bob |
|00000700| 74 65 78 74 20 77 61 73 | 20 61 20 53 6b 69 70 70 |text was| a Skipp|
|00000710| 79 20 42 6c 61 69 72 20 | 73 70 65 63 69 61 6c 20 |y Blair |special |
|00000720| 63 6f 6e 63 65 70 74 2c | 0d 09 09 09 09 09 09 6b |concept,|.......k|
|00000730| 65 70 74 20 66 6f 72 20 | 6f 62 76 69 6f 75 73 20 |ept for |obvious |
|00000740| 61 65 73 74 68 65 74 69 | 63 20 72 65 61 73 6f 6e |aestheti|c reason|
|00000750| 73 2e 0d 09 09 09 09 09 | 09 0d 09 09 09 09 09 09 |s.......|........|
|00000760| 59 6f 75 20 63 61 6e 20 | 62 75 69 6c 64 20 74 68 |You can |build th|
|00000770| 65 20 70 72 6f 67 72 61 | 6d 20 77 69 74 68 20 74 |e progra|m with t|
|00000780| 68 69 73 20 6a 75 6e 6b | 3a 0d 43 20 2d 72 20 53 |his junk|:.C -r S|
|00000790| 69 6c 6c 79 42 61 6c 6c | 73 2e 63 0d 4c 69 6e 6b |illyBall|s.c.Link|
|000007a0| 20 53 69 6c 6c 79 42 61 | 6c 6c 73 2e 63 2e 6f 20 | SillyBa|lls.c.o |
|000007b0| b6 0d 09 22 7b 4c 69 62 | 72 61 72 69 65 73 7d 22 |..."{Lib|raries}"|
|000007c0| 49 6e 74 65 72 66 61 63 | 65 2e 6f 20 b6 0d 09 22 |Interfac|e.o ..."|
|000007d0| 7b 43 4c 69 62 72 61 72 | 69 65 73 7d 22 43 52 75 |{CLibrar|ies}"CRu|
|000007e0| 6e 74 69 6d 65 2e 6f 20 | b6 0d 09 22 7b 43 4c 69 |ntime.o |..."{CLi|
|000007f0| 62 72 61 72 69 65 73 7d | 22 43 49 6e 74 65 72 66 |braries}|"CInterf|
|00000800| 61 63 65 2e 6f 20 b6 0d | 09 2d 6f 20 43 53 69 6c |ace.o ..|.-o CSil|
|00000810| 6c 79 42 61 6c 6c 73 0d | 43 53 69 6c 6c 79 42 61 |lyBalls.|CSillyBa|
|00000820| 6c 6c 73 0d 2a 2f 0d 0d | 2f 2a 20 57 68 65 72 65 |lls.*/..|/* Where|
|00000830| 20 64 6f 65 73 20 69 74 | 20 66 69 74 3a 0d 09 54 | does it| fit:..T|
|00000840| 68 69 73 20 69 73 20 61 | 20 73 65 72 69 65 73 20 |his is a| series |
|00000850| 6f 66 20 73 61 6d 70 6c | 65 20 70 72 6f 67 72 61 |of sampl|e progra|
|00000860| 6d 73 20 66 6f 72 20 74 | 68 6f 73 65 20 64 6f 69 |ms for t|hose doi|
|00000870| 6e 67 20 64 65 76 65 6c | 6f 70 6d 65 6e 74 0d 09 |ng devel|opment..|
|00000880| 75 73 69 6e 67 20 43 6f | 6c 6f 72 20 51 75 69 63 |using Co|lor Quic|
|00000890| 6b 44 72 61 77 2e 20 20 | 53 69 6e 63 65 20 74 68 |kDraw. |Since th|
|000008a0| 65 20 77 68 6f 6c 65 20 | 63 6f 6c 6f 72 20 70 72 |e whole |color pr|
|000008b0| 6f 62 6c 65 6d 20 64 65 | 70 65 6e 64 73 0d 09 75 |oblem de|pends..u|
|000008c0| 70 6f 6e 20 74 68 65 20 | 65 78 61 63 74 20 65 66 |pon the |exact ef|
|000008d0| 66 65 63 74 20 64 65 73 | 69 72 65 64 2c 20 74 68 |fect des|ired, th|
|000008e0| 65 72 65 20 61 72 65 20 | 61 20 6e 75 6d 62 65 72 |ere are |a number|
|000008f0| 20 6f 66 20 61 6e 73 77 | 65 72 73 0d 09 74 6f 20 | of answ|ers..to |
|00000900| 68 6f 77 20 74 6f 20 75 | 73 65 20 63 6f 6c 6f 72 |how to u|se color|
|00000910| 73 2c 20 66 72 6f 6d 20 | 74 68 65 20 73 69 6d 70 |s, from |the simp|
|00000920| 6c 65 20 74 6f 20 74 68 | 65 20 72 61 64 69 63 61 |le to th|e radica|
|00000930| 6c 6c 79 20 63 6f 6d 70 | 6c 65 78 2e 0d 09 54 68 |lly comp|lex...Th|
|00000940| 65 73 65 20 70 72 6f 67 | 72 61 6d 73 20 74 72 79 |ese prog|rams try|
|00000950| 20 74 6f 20 63 6f 76 65 | 72 20 74 68 65 20 67 61 | to cove|r the ga|
|00000960| 6d 75 74 2c 20 73 6f 20 | 79 6f 75 20 73 68 6f 75 |mut, so |you shou|
|00000970| 6c 64 20 75 73 65 20 0d | 09 77 68 69 63 68 20 65 |ld use .|.which e|
|00000980| 76 65 72 20 73 65 65 6d | 73 20 61 70 70 72 6f 70 |ver seem|s approp|
|00000990| 72 69 61 74 65 2e 20 20 | 49 6e 20 6d 6f 73 74 20 |riate. |In most |
|000009a0| 63 61 73 65 73 2c 20 75 | 73 65 20 74 68 65 20 73 |cases, u|se the s|
|000009b0| 69 6d 70 6c 65 73 74 0d | 09 6f 6e 65 20 74 68 61 |implest.|.one tha|
|000009c0| 74 20 77 69 6c 6c 20 67 | 69 76 65 20 74 68 65 20 |t will g|ive the |
|000009d0| 64 65 73 69 72 65 64 20 | 72 65 73 75 6c 74 73 2e |desired |results.|
|000009e0| 20 20 54 68 65 20 63 6f | 6d 70 61 74 69 62 69 6c | The co|mpatibil|
|000009f0| 69 74 79 0d 09 72 61 74 | 69 6e 67 20 69 73 20 66 |ity..rat|ing is f|
|00000a00| 72 6f 6d 20 30 2e 2e 39 | 20 77 68 65 72 65 20 6c |rom 0..9| where l|
|00000a10| 6f 77 20 69 73 20 62 65 | 74 74 65 72 2e 20 20 54 |ow is be|tter. T|
|00000a20| 68 65 20 6d 6f 72 65 20 | 6b 6e 6f 77 6e 20 72 69 |he more |known ri|
|00000a30| 73 6b 73 20 0d 09 74 68 | 65 72 65 20 61 72 65 20 |sks ..th|ere are |
|00000a40| 74 68 65 20 68 69 67 68 | 65 72 20 74 68 65 20 72 |the high|er the r|
|00000a50| 61 74 69 6e 67 2e 0d 09 | 0d 09 0d 09 54 68 65 20 |ating...|....The |
|00000a60| 70 72 6f 67 72 61 6d 73 | 20 28 69 6e 20 6f 72 64 |programs| (in ord|
|00000a70| 65 72 20 6f 66 20 63 6f | 6d 70 61 74 69 62 69 6c |er of co|mpatibil|
|00000a80| 69 74 79 29 3a 0d 09 0d | 09 09 53 69 6c 6c 79 42 |ity):...|..SillyB|
|00000a90| 61 6c 6c 73 3a 09 28 2a | 2a 2a 29 0d 09 09 09 54 |alls:.(*|**)....T|
|00000aa0| 68 69 73 20 69 73 20 74 | 68 65 20 73 69 6d 70 6c |his is t|he simpl|
|00000ab0| 65 73 74 20 75 73 65 20 | 6f 66 20 43 6f 6c 6f 72 |est use |of Color|
|00000ac0| 20 51 75 69 63 6b 44 72 | 61 77 2c 20 61 6e 64 20 | QuickDr|aw, and |
|00000ad0| 64 6f 65 73 0d 09 09 09 | 6e 6f 74 20 75 73 65 20 |does....|not use |
|00000ae0| 74 68 65 20 50 61 6c 65 | 74 74 65 20 4d 61 6e 61 |the Pale|tte Mana|
|00000af0| 67 65 72 2e 20 20 49 74 | 20 64 72 61 77 73 20 72 |ger. It| draws r|
|00000b00| 61 6e 64 6f 6d 6c 79 20 | 63 6f 6c 6f 72 65 64 0d |andomly |colored.|
|00000b10| 09 09 09 62 61 6c 6c 73 | 20 69 6e 20 61 20 63 6f |...balls| in a co|
|00000b20| 6c 6f 72 20 77 69 6e 64 | 6f 77 2e 20 20 54 68 69 |lor wind|ow. Thi|
|00000b30| 73 20 69 73 20 69 6e 74 | 65 6e 64 65 64 20 74 6f |s is int|ended to|
|00000b40| 20 67 69 76 65 20 79 6f | 75 0d 09 09 09 74 68 65 | give yo|u....the|
|00000b50| 20 61 62 73 6f 6c 75 74 | 65 20 6d 69 6e 69 6d 75 | absolut|e minimu|
|00000b60| 6d 20 72 65 71 75 69 72 | 65 64 20 74 6f 20 67 65 |m requir|ed to ge|
|00000b70| 74 20 63 6f 6c 6f 72 20 | 6f 6e 20 74 68 65 20 73 |t color |on the s|
|00000b80| 63 72 65 65 6e 2e 0d 09 | 09 09 57 72 69 74 74 65 |creen...|..Writte|
|00000b90| 6e 20 69 6e 20 73 74 72 | 61 69 67 68 74 20 50 61 |n in str|aight Pa|
|00000ba0| 73 63 61 6c 20 63 6f 64 | 65 2e 0d 09 09 09 43 6f |scal cod|e.....Co|
|00000bb0| 6d 70 61 74 69 62 69 6c | 69 74 79 20 72 61 74 69 |mpatibil|ity rati|
|00000bc0| 6e 67 20 3d 20 30 2c 20 | 6e 6f 20 6b 6e 6f 77 6e |ng = 0, |no known|
|00000bd0| 20 72 69 73 6b 73 2e 0d | 09 09 0d 09 09 46 72 61 | risks..|.....Fra|
|00000be0| 63 41 70 70 50 61 6c 65 | 74 74 65 3a 0d 09 09 09 |cAppPale|tte:....|
|00000bf0| 54 68 69 73 20 69 73 20 | 61 20 76 65 72 73 69 6f |This is |a versio|
|00000c00| 6e 20 6f 66 20 46 72 61 | 63 41 70 70 20 74 68 61 |n of Fra|cApp tha|
|00000c10| 74 20 75 73 65 73 20 6f | 6e 6c 79 20 74 68 65 20 |t uses o|nly the |
|00000c20| 50 61 6c 65 74 74 65 0d | 09 09 09 4d 61 6e 61 67 |Palette.|...Manag|
|00000c30| 65 72 2e 20 20 49 74 20 | 64 6f 65 73 20 6e 6f 74 |er. It |does not|
|00000c40| 20 73 75 70 70 6f 72 74 | 20 63 6f 6c 6f 72 20 74 | support| color t|
|00000c50| 61 62 6c 65 20 61 6e 69 | 6d 61 74 69 6f 6e 0d 09 |able ani|mation..|
|00000c60| 09 09 73 69 6e 63 65 20 | 74 68 61 74 20 70 61 72 |..since |that par|
|00000c70| 74 20 6f 66 20 74 68 65 | 20 50 61 6c 65 74 74 65 |t of the| Palette|
|00000c80| 20 4d 61 6e 61 67 65 72 | 20 69 73 20 6e 6f 74 20 | Manager| is not |
|00000c90| 73 75 66 66 69 63 69 65 | 6e 74 2e 0d 09 09 09 54 |sufficie|nt.....T|
|00000ca0| 68 65 20 70 72 6f 67 72 | 61 6d 20 64 65 6d 6f 6e |he progr|am demon|
|00000cb0| 73 74 72 61 74 65 73 20 | 61 20 66 75 6c 6c 20 63 |strates |a full c|
|00000cc0| 6f 6c 6f 72 20 70 61 6c | 65 74 74 65 20 74 68 61 |olor pal|ette tha|
|00000cd0| 74 20 69 73 0d 09 09 09 | 75 73 65 64 20 74 6f 20 |t is....|used to |
|00000ce0| 64 69 73 70 6c 61 79 20 | 74 68 65 20 4d 61 6e 64 |display |the Mand|
|00000cf0| 65 6c 62 72 6f 74 20 73 | 65 74 2e 20 20 49 74 20 |elbrot s|et. It |
|00000d00| 75 73 65 73 20 61 6e 20 | 6f 66 66 73 63 72 65 65 |uses an |offscree|
|00000d10| 6e 0d 09 09 09 67 44 65 | 76 69 63 65 20 77 2f 20 |n....gDe|vice w/ |
|00000d20| 50 6f 72 74 20 74 6f 20 | 68 61 6e 64 6c 65 20 74 |Port to |handle t|
|00000d30| 68 65 20 64 61 74 61 2c | 20 75 73 69 6e 67 20 43 |he data,| using C|
|00000d40| 6f 70 79 42 69 74 73 20 | 74 6f 0d 09 09 09 64 72 |opyBits |to....dr|
|00000d50| 61 77 20 74 6f 20 74 68 | 65 20 77 69 6e 64 6f 77 |aw to th|e window|
|00000d60| 2e 20 20 54 68 65 20 50 | 61 6c 65 74 74 65 20 69 |. The P|alette i|
|00000d70| 73 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 20 |s automa|tically |
|00000d80| 0d 09 09 09 61 73 73 6f | 63 69 61 74 65 64 20 77 |....asso|ciated w|
|00000d90| 69 74 68 20 65 61 63 68 | 20 77 69 6e 64 6f 77 2e |ith each| window.|
|00000da0| 20 20 54 68 65 20 50 49 | 43 54 20 66 69 6c 65 73 | The PI|CT files|
|00000db0| 20 61 72 65 20 72 65 61 | 64 0d 09 09 09 61 6e 64 | are rea|d....and|
|00000dc0| 20 77 72 69 74 74 65 6e | 20 75 73 69 6e 67 20 74 | written| using t|
|00000dd0| 68 65 20 62 6f 74 74 6c | 65 6e 65 63 6b 73 2c 20 |he bottl|enecks, |
|00000de0| 74 6f 20 73 61 76 65 20 | 6f 6e 20 6d 65 6d 6f 72 |to save |on memor|
|00000df0| 79 0d 09 09 09 75 73 65 | 61 67 65 2e 0d 09 09 09 |y....use|age.....|
|00000e00| 57 72 69 74 74 65 6e 20 | 69 6e 20 4d 61 63 41 70 |Written |in MacAp|
|00000e10| 70 20 4f 62 6a 65 63 74 | 20 50 61 73 63 61 6c 20 |p Object| Pascal |
|00000e20| 63 6f 64 65 2e 0d 09 09 | 09 43 6f 6d 70 61 74 69 |code....|.Compati|
|00000e30| 62 69 6c 69 74 79 20 72 | 61 74 69 6e 67 20 3d 20 |bility r|ating = |
|00000e40| 30 2c 20 6e 6f 20 6b 6e | 6f 77 6e 20 72 69 73 6b |0, no kn|own risk|
|00000e50| 73 2e 0d 09 09 0d 09 09 | 54 75 62 65 54 65 73 74 |s.......|TubeTest|
|00000e60| 3a 0d 09 09 09 54 68 69 | 73 20 69 73 20 61 20 73 |:....Thi|s is a s|
|00000e70| 6d 61 6c 6c 20 64 65 6d | 6f 20 70 72 6f 67 72 61 |mall dem|o progra|
|00000e80| 6d 20 74 68 61 74 20 64 | 65 6d 6f 6e 73 74 72 61 |m that d|emonstra|
|00000e90| 74 65 73 20 75 73 69 6e | 67 20 74 68 65 0d 09 09 |tes usin|g the...|
|00000ea0| 09 50 61 6c 65 74 74 65 | 20 4d 61 6e 61 67 65 72 |.Palette| Manager|
|00000eb0| 20 66 6f 72 20 63 6f 6c | 6f 72 20 74 61 62 6c 65 | for col|or table|
|00000ec0| 20 61 6e 69 6d 61 74 69 | 6f 6e 2e 20 20 49 74 20 | animati|on. It |
|00000ed0| 75 73 65 73 20 61 20 0d | 09 09 09 63 6f 6c 6f 72 |uses a .|...color|
|00000ee0| 20 70 61 6c 65 74 74 65 | 20 77 69 74 68 20 61 6e | palette| with an|
|00000ef0| 69 6d 61 74 69 6e 67 20 | 65 6e 74 72 69 65 73 2c |imating |entries,|
|00000f00| 20 61 6e 64 20 64 72 61 | 77 73 20 75 73 69 6e 67 | and dra|ws using|
|00000f10| 20 74 68 65 0d 09 09 09 | 50 61 6c 65 74 74 65 20 | the....|Palette |
|00000f20| 4d 61 6e 61 67 65 72 2e | 20 20 54 68 65 72 65 20 |Manager.| There |
|00000f30| 61 72 65 20 74 77 6f 20 | 63 69 72 63 6c 65 73 20 |are two |circles |
|00000f40| 6f 66 20 61 6e 69 6d 61 | 74 69 6e 67 20 63 6f 6c |of anima|ting col|
|00000f50| 6f 72 73 0d 09 09 09 77 | 68 69 63 68 20 67 69 76 |ors....w|hich giv|
|00000f60| 65 73 20 61 20 66 6c 6f | 77 69 6e 67 20 74 75 62 |es a flo|wing tub|
|00000f70| 65 20 65 66 66 65 63 74 | 2e 20 20 54 68 69 73 20 |e effect|. This |
|00000f80| 69 73 20 61 20 76 61 6c | 69 64 20 63 61 73 65 0d |is a val|id case.|
|00000f90| 09 09 09 66 6f 72 20 75 | 73 69 6e 67 20 74 68 65 |...for u|sing the|
|00000fa0| 20 61 6e 69 6d 61 74 69 | 6e 67 20 63 6f 6c 6f 72 | animati|ng color|
|00000fb0| 73 20 61 73 70 65 63 74 | 20 6f 66 20 74 68 65 20 |s aspect| of the |
|00000fc0| 50 61 6c 65 74 74 65 20 | 4d 61 6e 61 67 65 72 2c |Palette |Manager,|
|00000fd0| 0d 09 09 09 73 69 6e 63 | 65 20 74 68 65 20 69 6d |....sinc|e the im|
|00000fe0| 61 67 65 20 69 73 20 62 | 65 69 6e 67 20 64 72 61 |age is b|eing dra|
|00000ff0| 77 6e 20 64 69 72 65 63 | 74 6c 79 2e 0d 09 09 09 |wn direc|tly.....|
|00001000| 57 72 69 74 74 65 6e 20 | 69 6e 20 73 74 72 61 69 |Written |in strai|
|00001010| 67 68 74 20 50 61 73 63 | 61 6c 20 63 6f 64 65 2e |ght Pasc|al code.|
|00001020| 0d 09 09 09 43 6f 6d 70 | 61 74 69 62 69 6c 69 74 |....Comp|atibilit|
|00001030| 79 20 72 61 74 69 6e 67 | 20 3d 20 30 2c 20 6e 6f |y rating| = 0, no|
|00001040| 20 6b 6e 6f 77 6e 20 72 | 69 73 6b 73 2e 0d 09 09 | known r|isks....|
|00001050| 0d 09 09 46 72 61 63 41 | 70 70 3a 0d 09 09 09 54 |...FracA|pp:....T|
|00001060| 68 69 73 20 69 73 20 74 | 68 65 20 d4 63 6f 6d 6d |his is t|he .comm|
|00001070| 65 72 63 69 61 6c 20 71 | 75 61 6c 69 74 79 d5 20 |ercial q|uality. |
|00001080| 76 65 72 73 69 6f 6e 20 | 6f 66 20 46 72 61 63 41 |version |of FracA|
|00001090| 70 70 2e 20 20 54 68 69 | 73 0d 09 09 09 76 65 72 |pp. Thi|s....ver|
|000010a0| 73 69 6f 6e 20 73 75 70 | 70 6f 72 74 73 20 63 6f |sion sup|ports co|
|000010b0| 6c 6f 72 20 74 61 62 6c | 65 20 61 6e 69 6d 61 74 |lor tabl|e animat|
|000010c0| 69 6f 6e 2c 20 75 73 69 | 6e 67 20 61 6e 20 6f 66 |ion, usi|ng an of|
|000010d0| 66 73 63 72 65 65 6e 0d | 09 09 09 67 44 65 76 69 |fscreen.|...gDevi|
|000010e0| 63 65 20 77 2f 20 50 6f | 72 74 2c 20 61 6e 64 20 |ce w/ Po|rt, and |
|000010f0| 68 61 6e 64 6c 65 73 20 | 6d 75 6c 74 69 70 6c 65 |handles |multiple|
|00001100| 20 64 6f 63 75 6d 65 6e | 74 73 2e 20 20 54 68 65 | documen|ts. The|
|00001110| 0d 09 09 09 43 6f 70 79 | 42 69 74 73 20 75 70 64 |....Copy|Bits upd|
|00001120| 61 74 65 73 20 74 6f 20 | 74 68 65 20 73 63 72 65 |ates to |the scre|
|00001130| 65 6e 20 61 72 65 20 61 | 73 20 66 61 73 74 20 61 |en are a|s fast a|
|00001140| 73 20 70 6f 73 73 69 62 | 6c 65 2e 20 20 54 68 65 |s possib|le. The|
|00001150| 0d 09 09 09 70 72 6f 67 | 72 61 6d 20 64 6f 65 73 |....prog|ram does|
|00001160| 20 6e 6f 74 20 75 73 65 | 20 74 68 65 20 50 61 6c | not use| the Pal|
|00001170| 65 74 74 65 20 4d 61 6e | 61 67 65 72 2c 20 65 78 |ette Man|ager, ex|
|00001180| 63 65 70 74 20 74 6f 0d | 09 09 09 70 72 6f 76 69 |cept to.|...provi|
|00001190| 64 65 20 66 6f 72 20 74 | 68 65 20 73 79 73 74 65 |de for t|he syste|
|000011a0| 6d 20 70 61 6c 65 74 74 | 65 2c 20 6f 72 20 63 6f |m palett|e, or co|
|000011b0| 6c 6f 72 20 6d 6f 64 65 | 73 20 77 69 74 68 20 6c |lor mode|s with l|
|000011c0| 65 73 73 20 74 68 61 6e | 0d 09 09 09 32 35 35 20 |ess than|....255 |
|000011d0| 63 6f 6c 6f 72 73 2e 20 | 20 46 6f 72 20 63 6f 6c |colors. | For col|
|000011e0| 6f 72 20 74 61 62 6c 65 | 20 61 6e 69 6d 61 74 69 |or table| animati|
|000011f0| 6f 6e 20 75 73 69 6e 67 | 20 61 6e 20 6f 66 66 73 |on using| an offs|
|00001200| 63 72 65 65 6e 0d 09 09 | 09 67 44 65 76 69 63 65 |creen...|.gDevice|
|00001210| 20 77 2f 20 50 6f 72 74 | 2c 20 69 74 20 75 73 65 | w/ Port|, it use|
|00001220| 73 20 74 68 65 20 43 6f | 6c 6f 72 20 4d 61 6e 61 |s the Co|lor Mana|
|00001230| 67 65 72 20 61 6e 64 20 | 68 61 6e 64 6c 65 73 20 |ger and |handles |
|00001240| 74 68 65 0d 09 09 09 63 | 6f 6c 6f 72 73 20 69 74 |the....c|olors it|
|00001250| 73 65 6c 66 2e 20 20 53 | 74 72 69 63 74 20 63 6f |self. S|trict co|
|00001260| 6d 70 61 74 69 62 69 6c | 69 74 79 20 77 61 73 20 |mpatibil|ity was |
|00001270| 72 65 6c 61 78 65 64 20 | 74 6f 20 61 6c 6c 6f 77 |relaxed |to allow|
|00001280| 20 66 6f 72 0d 09 09 09 | 61 20 68 69 67 68 65 72 | for....|a higher|
|00001290| 20 70 65 72 66 6f 72 6d | 61 6e 63 65 20 70 72 6f | perform|ance pro|
|000012a0| 67 72 61 6d 2e 20 20 54 | 68 69 73 20 69 73 20 74 |gram. T|his is t|
|000012b0| 68 65 20 6d 6f 73 74 20 | d4 72 65 61 6c d5 20 6f |he most |.real. o|
|000012c0| 66 20 74 68 65 0d 09 09 | 09 73 61 6d 70 6c 65 20 |f the...|.sample |
|000012d0| 70 72 6f 67 72 61 6d 73 | 2e 0d 09 09 09 57 72 69 |programs|.....Wri|
|000012e0| 74 74 65 6e 20 69 6e 20 | 4d 61 63 41 70 70 20 4f |tten in |MacApp O|
|000012f0| 62 6a 65 63 74 20 50 61 | 73 63 61 6c 20 63 6f 64 |bject Pa|scal cod|
|00001300| 65 2e 0d 09 09 09 43 6f | 6d 70 61 74 69 62 69 6c |e.....Co|mpatibil|
|00001310| 69 74 79 20 72 61 74 69 | 6e 67 20 3d 20 32 2e 20 |ity rati|ng = 2. |
|00001320| 20 28 6e 6f 74 68 69 6e | 67 20 77 69 6c 6c 20 62 | (nothin|g will b|
|00001330| 72 65 61 6b 2c 20 62 75 | 74 20 69 74 20 6d 61 79 |reak, bu|t it may|
|00001340| 20 6e 6f 74 0d 09 09 09 | 09 61 6c 77 61 79 73 20 | not....|.always |
|00001350| 6c 6f 6f 6b 20 63 6f 72 | 72 65 63 74 2e 29 0d 09 |look cor|rect.)..|
|00001360| 09 0d 09 09 46 72 61 63 | 41 70 70 33 30 30 3a 0d |....Frac|App300:.|
|00001370| 09 09 09 54 68 69 73 20 | 64 6f 65 73 6e 27 74 20 |...This |doesn't |
|00001380| 73 75 70 70 6f 72 74 20 | 63 6f 6c 6f 72 73 2c 20 |support |colors, |
|00001390| 62 75 74 20 64 65 6d 6f | 6e 73 74 72 61 74 65 73 |but demo|nstrates|
|000013a0| 20 68 6f 77 20 74 6f 20 | 63 72 65 61 74 65 20 61 | how to |create a|
|000013b0| 6e 64 0d 09 09 09 75 73 | 65 20 61 20 33 30 30 20 |nd....us|e a 300 |
|000013c0| 64 70 69 20 62 69 74 6d | 61 70 20 77 2f 20 50 6f |dpi bitm|ap w/ Po|
|000013d0| 72 74 2e 20 20 54 68 65 | 20 62 69 74 6d 61 70 20 |rt. The| bitmap |
|000013e0| 69 73 20 70 72 69 6e 74 | 65 64 20 61 74 20 66 75 |is print|ed at fu|
|000013f0| 6c 6c 0d 09 09 09 72 65 | 73 6f 6c 75 74 69 6f 6e |ll....re|solution|
|00001400| 20 6f 6e 20 4c 61 73 65 | 72 57 72 69 74 65 72 73 | on Lase|rWriters|
|00001410| 2c 20 61 6e 64 20 63 6c | 69 70 70 65 64 20 6f 6e |, and cl|ipped on|
|00001420| 20 6f 74 68 65 72 20 70 | 72 69 6e 74 65 72 73 20 | other p|rinters |
|00001430| 28 62 75 74 0d 09 09 09 | 74 68 65 79 20 73 74 69 |(but....|they sti|
|00001440| 6c 6c 20 70 72 69 6e 74 | 29 2e 20 20 49 74 20 64 |ll print|). It d|
|00001450| 65 6d 6f 6e 73 74 72 61 | 74 65 73 20 68 6f 77 20 |emonstra|tes how |
|00001460| 74 6f 20 75 73 65 20 61 | 20 68 69 67 68 20 72 65 |to use a| high re|
|00001470| 73 6f 6c 75 74 69 6f 6e | 0d 09 09 09 69 6d 61 67 |solution|....imag|
|00001480| 65 20 61 73 20 61 20 50 | 49 43 54 20 66 69 6c 65 |e as a P|ICT file|
|00001490| 2c 20 61 6e 64 20 68 6f | 77 20 74 6f 20 70 72 69 |, and ho|w to pri|
|000014a0| 6e 74 20 74 68 65 6d 20 | 6f 75 74 2e 0d 09 09 09 |nt them |out.....|
|000014b0| 57 72 69 74 74 65 6e 20 | 69 6e 20 4d 61 63 41 70 |Written |in MacAp|
|000014c0| 70 20 4f 62 6a 65 63 74 | 20 50 61 73 63 61 6c 20 |p Object| Pascal |
|000014d0| 63 6f 64 65 2e 0d 09 09 | 09 43 6f 6d 70 61 74 69 |code....|.Compati|
|000014e0| 62 69 6c 69 74 79 20 72 | 61 74 69 6e 67 20 3d 20 |bility r|ating = |
|000014f0| 31 2e 20 20 28 54 68 65 | 20 75 73 65 20 6f 66 20 |1. (The| use of |
|00001500| 50 72 47 65 6e 65 72 61 | 6c 20 69 73 20 73 6c 69 |PrGenera|l is sli|
|00001510| 67 68 74 6c 79 20 0d 09 | 09 09 09 6f 75 74 20 6f |ghtly ..|...out o|
|00001520| 66 20 74 68 65 20 6f 72 | 64 69 6e 61 72 79 2c 20 |f the or|dinary, |
|00001530| 61 6c 74 68 6f 75 67 68 | 20 73 75 70 70 6f 72 74 |although| support|
|00001540| 65 64 2e 29 0d 2a 2f 0d | 0d 23 69 6e 63 6c 75 64 |ed.).*/.|.#includ|
|00001550| 65 20 3c 54 79 70 65 73 | 2e 68 3e 0d 23 69 6e 63 |e <Types|.h>.#inc|
|00001560| 6c 75 64 65 20 3c 4d 65 | 6d 6f 72 79 2e 68 3e 0d |lude <Me|mory.h>.|
|00001570| 23 69 6e 63 6c 75 64 65 | 20 3c 51 75 69 63 6b 64 |#include| <Quickd|
|00001580| 72 61 77 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |raw.h>.#|include |
|00001590| 3c 46 6f 6e 74 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Fonts.h|>.#inclu|
|000015a0| 64 65 20 3c 45 76 65 6e | 74 73 2e 68 3e 0d 23 69 |de <Even|ts.h>.#i|
|000015b0| 6e 63 6c 75 64 65 20 3c | 4d 65 6e 75 73 2e 68 3e |nclude <|Menus.h>|
|000015c0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 57 69 6e 64 6f |.#includ|e <Windo|
|000015d0| 77 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ws.h>.#i|nclude <|
|000015e0| 54 65 78 74 45 64 69 74 | 2e 68 3e 0d 23 69 6e 63 |TextEdit|.h>.#inc|
|000015f0| 6c 75 64 65 20 3c 44 69 | 61 6c 6f 67 73 2e 68 3e |lude <Di|alogs.h>|
|00001600| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 4f 53 55 74 69 |.#includ|e <OSUti|
|00001610| 6c 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ls.h>.#i|nclude <|
|00001620| 54 6f 6f 6c 55 74 69 6c | 73 2e 68 3e 0d 23 69 6e |ToolUtil|s.h>.#in|
|00001630| 63 6c 75 64 65 20 3c 53 | 65 67 4c 6f 61 64 2e 68 |clude <S|egLoad.h|
|00001640| 3e 0d 0d 2f 2a 20 43 6f | 6e 73 74 61 6e 74 73 20 |>../* Co|nstants |
|00001650| 2a 2f 0d 23 64 65 66 69 | 6e 65 20 42 61 6c 6c 57 |*/.#defi|ne BallW|
|00001660| 69 64 74 68 09 09 32 30 | 0d 23 64 65 66 69 6e 65 |idth..20|.#define|
|00001670| 20 42 61 6c 6c 48 65 69 | 67 68 74 09 09 32 30 0d | BallHei|ght..20.|
|00001680| 23 64 65 66 69 6e 65 20 | 42 6f 62 53 69 7a 65 09 |#define |BobSize.|
|00001690| 09 09 38 09 09 2f 2a 20 | 53 69 7a 65 20 6f 66 20 |..8../* |Size of |
|000016a0| 74 65 78 74 20 69 6e 20 | 65 61 63 68 20 62 61 6c |text in |each bal|
|000016b0| 6c 20 2a 2f 0d 0d 2f 2a | 20 47 6c 6f 62 61 6c 73 |l */../*| Globals|
|000016c0| 20 2a 2f 0d 52 65 63 74 | 09 77 69 6e 64 52 65 63 | */.Rect|.windRec|
|000016d0| 74 3b 0d 09 0d 2f 2a 20 | 50 72 6f 74 6f 74 79 70 |t;.../* |Prototyp|
|000016e0| 65 73 20 2a 2f 0d 76 6f | 69 64 20 49 6e 69 74 69 |es */.vo|id Initi|
|000016f0| 61 6c 69 7a 65 28 76 6f | 69 64 29 3b 0d 76 6f 69 |alize(vo|id);.voi|
|00001700| 64 20 4e 65 77 42 61 6c | 6c 28 76 6f 69 64 29 3b |d NewBal|l(void);|
|00001710| 0d 0d 2f 2a 20 0d 2a 2a | 09 4d 61 69 6e 20 62 6f |../* .**|.Main bo|
|00001720| 64 79 20 6f 66 20 70 72 | 6f 67 72 61 6d 20 53 69 |dy of pr|ogram Si|
|00001730| 6c 6c 79 42 61 6c 6c 73 | 0d 2a 2f 0d 6d 61 69 6e |llyBalls|.*/.main|
|00001740| 28 29 0d 7b 0d 09 49 6e | 69 74 69 61 6c 69 7a 65 |().{..In|itialize|
|00001750| 28 29 3b 0d 09 0d 09 64 | 6f 20 7b 0d 09 09 4e 65 |();....d|o {...Ne|
|00001760| 77 42 61 6c 6c 28 29 3b | 0d 09 7d 20 77 68 69 6c |wBall();|..} whil|
|00001770| 65 20 28 21 42 75 74 74 | 6f 6e 28 29 29 3b 0d 09 |e (!Butt|on());..|
|00001780| 0d 7d 0d 0d 2f 2a 20 0d | 2a 2a 09 49 6e 69 74 69 |.}../* .|**.Initi|
|00001790| 61 6c 69 7a 65 20 65 76 | 65 72 79 74 68 69 6e 67 |alize ev|erything|
|000017a0| 20 66 6f 72 20 74 68 65 | 20 70 72 6f 67 72 61 6d | for the| program|
|000017b0| 2c 20 6d 61 6b 65 20 73 | 75 72 65 20 77 65 20 63 |, make s|ure we c|
|000017c0| 61 6e 20 72 75 6e 0d 2a | 2f 0d 76 6f 69 64 20 49 |an run.*|/.void I|
|000017d0| 6e 69 74 69 61 6c 69 7a | 65 28 29 0d 7b 0d 09 57 |nitializ|e().{..W|
|000017e0| 69 6e 64 6f 77 50 74 72 | 09 6d 61 69 6e 50 74 72 |indowPtr|.mainPtr|
|000017f0| 3b 0d 09 4f 53 45 72 72 | 09 09 65 72 72 6f 72 3b |;..OSErr|..error;|
|00001800| 0d 09 53 79 73 45 6e 76 | 52 65 63 09 74 68 65 57 |..SysEnv|Rec.theW|
|00001810| 6f 72 6c 64 3b 0d 09 0d | 09 2f 2a 0d 09 2a 2a 09 |orld;...|./*..**.|
|00001820| 54 65 73 74 20 74 68 65 | 20 63 6f 6d 70 75 74 65 |Test the| compute|
|00001830| 72 20 74 6f 20 62 65 20 | 73 75 72 65 20 77 65 20 |r to be |sure we |
|00001840| 63 61 6e 20 64 6f 20 63 | 6f 6c 6f 72 2e 20 20 0d |can do c|olor. .|
|00001850| 09 2a 2a 09 49 66 20 6e | 6f 74 20 77 65 20 77 6f |.**.If n|ot we wo|
|00001860| 75 6c 64 20 63 72 61 73 | 68 2c 20 77 68 69 63 68 |uld cras|h, which|
|00001870| 20 77 6f 75 6c 64 20 62 | 65 20 62 61 64 2e 20 20 | would b|e bad. |
|00001880| 0d 09 2a 2a 09 49 66 20 | 77 65 20 63 61 6e d5 74 |..**.If |we can.t|
|00001890| 20 72 75 6e 2c 20 6a 75 | 73 74 20 62 65 65 70 20 | run, ju|st beep |
|000018a0| 61 6e 64 20 65 78 69 74 | 2e 0d 09 2a 2f 0d 09 65 |and exit|...*/..e|
|000018b0| 72 72 6f 72 20 3d 20 53 | 79 73 45 6e 76 69 72 6f |rror = S|ysEnviro|
|000018c0| 6e 73 28 31 2c 20 26 74 | 68 65 57 6f 72 6c 64 29 |ns(1, &t|heWorld)|
|000018d0| 3b 0d 09 69 66 20 28 74 | 68 65 57 6f 72 6c 64 2e |;..if (t|heWorld.|
|000018e0| 68 61 73 43 6f 6c 6f 72 | 51 44 20 3d 3d 20 66 61 |hasColor|QD == fa|
|000018f0| 6c 73 65 29 20 7b 0d 09 | 09 53 79 73 42 65 65 70 |lse) {..|.SysBeep|
|00001900| 28 35 30 29 3b 0d 09 09 | 45 78 69 74 54 6f 53 68 |(50);...|ExitToSh|
|00001910| 65 6c 6c 28 29 3b 09 09 | 09 09 09 2f 2a 20 49 66 |ell();..|.../* If|
|00001920| 20 6e 6f 20 63 6f 6c 6f | 72 20 51 44 2c 20 77 65 | no colo|r QD, we|
|00001930| 20 6d 75 73 74 20 6c 65 | 61 76 65 2e 20 2a 2f 0d | must le|ave. */.|
|00001940| 09 7d 0d 09 0d 09 2f 2a | 20 49 6e 69 74 69 61 6c |.}..../*| Initial|
|00001950| 69 7a 65 20 61 6c 6c 20 | 74 68 65 20 6e 65 65 64 |ize all |the need|
|00001960| 65 64 20 6d 61 6e 61 67 | 65 72 73 2e 20 2a 2f 0d |ed manag|ers. */.|
|00001970| 09 49 6e 69 74 47 72 61 | 66 28 26 71 64 2e 74 68 |.InitGra|f(&qd.th|
|00001980| 65 50 6f 72 74 29 3b 0d | 09 49 6e 69 74 46 6f 6e |ePort);.|.InitFon|
|00001990| 74 73 28 29 3b 0d 09 49 | 6e 69 74 57 69 6e 64 6f |ts();..I|nitWindo|
|000019a0| 77 73 28 29 3b 0d 09 49 | 6e 69 74 4d 65 6e 75 73 |ws();..I|nitMenus|
|000019b0| 28 29 3b 0d 09 54 45 49 | 6e 69 74 28 29 3b 0d 09 |();..TEI|nit();..|
|000019c0| 49 6e 69 74 44 69 61 6c | 6f 67 73 28 6e 69 6c 29 |InitDial|ogs(nil)|
|000019d0| 3b 0d 09 49 6e 69 74 43 | 75 72 73 6f 72 28 29 3b |;..InitC|ursor();|
|000019e0| 0d 0d 09 2f 2a 0d 09 2a | 2a 09 54 6f 20 6d 61 6b |.../*..*|*.To mak|
|000019f0| 65 20 74 68 65 20 52 61 | 6e 64 6f 6d 20 73 65 71 |e the Ra|ndom seq|
|00001a00| 75 65 6e 63 65 73 20 74 | 72 75 6c 79 20 72 61 6e |uences t|ruly ran|
|00001a10| 64 6f 6d 2c 20 77 65 20 | 6e 65 65 64 20 74 6f 20 |dom, we |need to |
|00001a20| 6d 61 6b 65 20 74 68 65 | 20 73 65 65 64 20 73 74 |make the| seed st|
|00001a30| 61 72 74 0d 09 2a 2a 09 | 61 74 20 61 20 64 69 66 |art..**.|at a dif|
|00001a40| 66 65 72 65 6e 74 20 6e | 75 6d 62 65 72 2e 20 20 |ferent n|umber. |
|00001a50| 41 6e 20 65 61 73 79 20 | 77 61 79 20 74 6f 20 64 |An easy |way to d|
|00001a60| 6f 20 74 68 69 73 20 69 | 73 20 74 6f 20 70 75 74 |o this i|s to put|
|00001a70| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 74 69 6d | the cur|rent tim|
|00001a80| 65 0d 09 2a 2a 09 61 6e | 64 20 64 61 74 65 20 69 |e..**.an|d date i|
|00001a90| 6e 74 6f 20 74 68 65 20 | 73 65 65 64 2e 20 20 53 |nto the |seed. S|
|00001aa0| 69 6e 63 65 20 69 74 20 | 69 73 20 61 6c 77 61 79 |ince it |is alway|
|00001ab0| 73 20 69 6e 63 72 65 6d | 65 6e 74 69 6e 67 20 74 |s increm|enting t|
|00001ac0| 68 65 20 73 74 61 72 74 | 69 6e 67 20 73 65 65 64 |he start|ing seed|
|00001ad0| 0d 09 2a 2a 09 77 69 6c | 6c 20 61 6c 77 61 79 73 |..**.wil|l always|
|00001ae0| 20 62 65 20 64 69 66 66 | 65 72 65 6e 74 2e 20 20 | be diff|erent. |
|00001af0| 44 6f 6e d5 74 20 66 6f | 72 20 65 61 63 68 20 63 |Don.t fo|r each c|
|00001b00| 61 6c 6c 20 6f 66 20 52 | 61 6e 64 6f 6d 2c 20 6f |all of R|andom, o|
|00001b10| 72 20 74 68 65 20 73 65 | 71 75 65 6e 63 65 0d 09 |r the se|quence..|
|00001b20| 2a 2a 09 77 69 6c 6c 20 | 6e 6f 20 6c 6f 6e 67 65 |**.will |no longe|
|00001b30| 72 20 62 65 20 72 61 6e | 64 6f 6d 2e 20 20 4f 6e |r be ran|dom. On|
|00001b40| 6c 79 20 6e 65 65 64 65 | 64 20 6f 6e 63 65 2c 20 |ly neede|d once, |
|00001b50| 68 65 72 65 20 69 6e 20 | 74 68 65 20 69 6e 69 74 |here in |the init|
|00001b60| 2e 0d 09 2a 2f 0d 09 47 | 65 74 44 61 74 65 54 69 |...*/..G|etDateTi|
|00001b70| 6d 65 28 28 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e |me((unsi|gned lon|
|00001b80| 67 2a 29 20 26 71 64 2e | 72 61 6e 64 53 65 65 64 |g*) &qd.|randSeed|
|00001b90| 29 3b 0d 0d 09 2f 2a 0d | 09 2a 2a 09 4d 61 6b 65 |);.../*.|.**.Make|
|00001ba0| 20 61 20 6e 65 77 20 77 | 69 6e 64 6f 77 20 66 6f | a new w|indow fo|
|00001bb0| 72 20 64 72 61 77 69 6e | 67 20 69 6e 2c 20 61 6e |r drawin|g in, an|
|00001bc0| 64 20 69 74 20 6d 75 73 | 74 20 62 65 20 61 20 63 |d it mus|t be a c|
|00001bd0| 6f 6c 6f 72 20 77 69 6e | 64 6f 77 2e 20 20 0d 09 |olor win|dow. ..|
|00001be0| 2a 2a 09 54 68 65 20 77 | 69 6e 64 6f 77 20 69 73 |**.The w|indow is|
|00001bf0| 20 66 75 6c 6c 20 73 63 | 72 65 65 6e 20 73 69 7a | full sc|reen siz|
|00001c00| 65 2c 20 6d 61 64 65 20 | 73 6d 61 6c 6c 65 72 20 |e, made |smaller |
|00001c10| 74 6f 20 6d 61 6b 65 20 | 69 74 20 6d 6f 72 65 20 |to make |it more |
|00001c20| 76 69 73 69 62 6c 65 2e | 0d 09 2a 2f 0d 09 77 69 |visible.|..*/..wi|
|00001c30| 6e 64 52 65 63 74 20 3d | 20 71 64 2e 73 63 72 65 |ndRect =| qd.scre|
|00001c40| 65 6e 42 69 74 73 2e 62 | 6f 75 6e 64 73 3b 0d 09 |enBits.b|ounds;..|
|00001c50| 49 6e 73 65 74 52 65 63 | 74 28 26 77 69 6e 64 52 |InsetRec|t(&windR|
|00001c60| 65 63 74 2c 20 35 30 2c | 20 35 30 29 3b 0d 09 6d |ect, 50,| 50);..m|
|00001c70| 61 69 6e 50 74 72 20 3d | 20 4e 65 77 43 57 69 6e |ainPtr =| NewCWin|
|00001c80| 64 6f 77 28 6e 69 6c 2c | 20 26 77 69 6e 64 52 65 |dow(nil,| &windRe|
|00001c90| 63 74 2c 20 22 5c 70 42 | 6f 33 62 20 4c 61 6e 64 |ct, "\pB|o3b Land|
|00001ca0| 22 2c 20 74 72 75 65 2c | 20 64 6f 63 75 6d 65 6e |", true,| documen|
|00001cb0| 74 50 72 6f 63 2c 20 0d | 09 09 09 09 09 09 28 50 |tProc, .|......(P|
|00001cc0| 74 72 29 20 2d 31 2c 20 | 66 61 6c 73 65 2c 20 30 |tr) -1, |false, 0|
|00001cd0| 29 3b 0d 09 09 0d 09 53 | 65 74 50 6f 72 74 28 6d |);.....S|etPort(m|
|00001ce0| 61 69 6e 50 74 72 29 3b | 09 09 09 09 09 09 2f 2a |ainPtr);|....../*|
|00001cf0| 20 73 65 74 20 77 69 6e | 64 6f 77 20 74 6f 20 63 | set win|dow to c|
|00001d00| 75 72 72 65 6e 74 20 67 | 72 61 66 20 70 6f 72 74 |urrent g|raf port|
|00001d10| 20 2a 2f 0d 09 54 65 78 | 74 53 69 7a 65 28 42 6f | */..Tex|tSize(Bo|
|00001d20| 62 53 69 7a 65 29 3b 09 | 09 09 09 09 09 2f 2a 20 |bSize);.|...../* |
|00001d30| 73 6d 61 6c 6c 65 72 20 | 66 6f 6e 74 20 66 6f 72 |smaller |font for|
|00001d40| 20 64 72 61 77 69 6e 67 | 2e 20 2a 2f 0d 7d 0d 0d | drawing|. */.}..|
|00001d50| 0d 2f 2a 20 0d 2a 2a 09 | 4e 65 77 42 61 6c 6c 3a |./* .**.|NewBall:|
|00001d60| 20 6d 61 6b 65 20 61 6e | 6f 74 68 65 72 20 62 61 | make an|other ba|
|00001d70| 6c 6c 20 69 6e 20 74 68 | 65 20 77 69 6e 64 6f 77 |ll in th|e window|
|00001d80| 20 61 74 20 61 20 72 61 | 6e 64 6f 6d 20 6c 6f 63 | at a ra|ndom loc|
|00001d90| 61 74 69 6f 6e 20 61 6e | 64 20 63 6f 6c 6f 72 2e |ation an|d color.|
|00001da0| 0d 2a 2f 0d 76 6f 69 64 | 20 4e 65 77 42 61 6c 6c |.*/.void| NewBall|
|00001db0| 28 29 0d 7b 0d 09 52 47 | 42 43 6f 6c 6f 72 09 62 |().{..RG|BColor.b|
|00001dc0| 61 6c 6c 43 6f 6c 6f 72 | 3b 0d 09 52 65 63 74 09 |allColor|;..Rect.|
|00001dd0| 09 62 61 6c 6c 52 65 63 | 74 3b 0d 09 6c 6f 6e 67 |.ballRec|t;..long|
|00001de0| 20 69 6e 74 09 6e 65 77 | 4c 65 66 74 2c 0d 09 09 | int.new|Left,...|
|00001df0| 09 09 6e 65 77 54 6f 70 | 3b 0d 09 0d 09 2f 2a 20 |..newTop|;..../* |
|00001e00| 0d 09 2a 2a 09 4d 61 6b | 65 20 61 20 72 61 6e 64 |..**.Mak|e a rand|
|00001e10| 6f 6d 20 6e 65 77 20 63 | 6f 6c 6f 72 20 66 6f 72 |om new c|olor for|
|00001e20| 20 74 68 65 20 62 61 6c | 6c 2e 0d 09 2a 2f 0d 09 | the bal|l...*/..|
|00001e30| 62 61 6c 6c 43 6f 6c 6f | 72 2e 72 65 64 20 20 20 |ballColo|r.red |
|00001e40| 3d 20 52 61 6e 64 6f 6d | 28 29 3b 0d 09 62 61 6c |= Random|();..bal|
|00001e50| 6c 43 6f 6c 6f 72 2e 67 | 72 65 65 6e 20 3d 20 52 |lColor.g|reen = R|
|00001e60| 61 6e 64 6f 6d 28 29 3b | 0d 09 62 61 6c 6c 43 6f |andom();|..ballCo|
|00001e70| 6c 6f 72 2e 62 6c 75 65 | 20 20 3d 20 52 61 6e 64 |lor.blue| = Rand|
|00001e80| 6f 6d 28 29 3b 0d 09 0d | 09 2f 2a 20 0d 09 2a 2a |om();...|./* ..**|
|00001e90| 09 53 65 74 20 74 68 61 | 74 20 63 6f 6c 6f 72 20 |.Set tha|t color |
|00001ea0| 61 73 20 74 68 65 20 6e | 65 77 20 63 6f 6c 6f 72 |as the n|ew color|
|00001eb0| 20 74 6f 20 75 73 65 20 | 69 6e 20 64 72 61 77 69 | to use |in drawi|
|00001ec0| 6e 67 2e 0d 09 2a 2f 0d | 09 52 47 42 46 6f 72 65 |ng...*/.|.RGBFore|
|00001ed0| 43 6f 6c 6f 72 20 28 26 | 62 61 6c 6c 43 6f 6c 6f |Color (&|ballColo|
|00001ee0| 72 29 3b 0d 0d 09 2f 2a | 09 0d 09 2a 2a 09 4d 61 |r);.../*|...**.Ma|
|00001ef0| 6b 65 20 61 20 52 61 6e | 64 6f 6d 20 6e 65 77 20 |ke a Ran|dom new |
|00001f00| 6c 6f 63 61 74 69 6f 6e | 20 66 6f 72 20 74 68 65 |location| for the|
|00001f10| 20 62 61 6c 6c 2c 20 74 | 68 61 74 20 69 73 20 6e | ball, t|hat is n|
|00001f20| 6f 72 6d 61 6c 69 7a 65 | 64 20 74 6f 20 74 68 65 |ormalize|d to the|
|00001f30| 20 77 69 6e 64 6f 77 20 | 73 69 7a 65 2e 20 20 0d | window |size. .|
|00001f40| 09 2a 2a 09 54 68 69 73 | 20 6d 61 6b 65 73 20 74 |.**.This| makes t|
|00001f50| 68 65 20 49 6e 74 65 67 | 65 72 20 66 72 6f 6d 20 |he Integ|er from |
|00001f60| 52 61 6e 64 6f 6d 20 69 | 6e 74 6f 20 61 20 6e 75 |Random i|nto a nu|
|00001f70| 6d 62 65 72 20 74 68 61 | 74 20 69 73 20 30 2e 2e |mber tha|t is 0..|
|00001f80| 77 69 6e 64 52 65 63 74 | 2e 62 6f 74 74 6f 6d 0d |windRect|.bottom.|
|00001f90| 09 2a 2a 09 61 6e 64 20 | 30 2e 2e 77 69 6e 64 52 |.**.and |0..windR|
|00001fa0| 65 63 74 2e 72 69 67 68 | 74 2e 20 20 54 68 65 79 |ect.righ|t. They|
|00001fb0| 20 61 72 65 20 6e 6f 72 | 6d 61 6c 69 7a 65 64 20 | are nor|malized |
|00001fc0| 73 6f 20 74 68 61 74 20 | 77 65 20 64 6f 6e 27 74 |so that |we don't|
|00001fd0| 20 73 70 65 6e 64 20 6d | 6f 73 74 20 6f 66 20 6f | spend m|ost of o|
|00001fe0| 75 72 0d 09 2a 2a 09 74 | 69 6d 65 20 64 72 61 77 |ur..**.t|ime draw|
|00001ff0| 69 6e 67 20 69 6e 20 70 | 6c 61 63 65 73 20 6f 75 |ing in p|laces ou|
|00002000| 74 73 69 64 65 20 6f 66 | 20 74 68 65 20 77 69 6e |tside of| the win|
|00002010| 64 6f 77 2e 0d 09 2a 2f | 0d 09 6e 65 77 54 6f 70 |dow...*/|..newTop|
|00002020| 20 3d 20 52 61 6e 64 6f | 6d 28 29 3b 09 6e 65 77 | = Rando|m();.new|
|00002030| 4c 65 66 74 20 3d 20 52 | 61 6e 64 6f 6d 28 29 3b |Left = R|andom();|
|00002040| 0d 09 6e 65 77 54 6f 70 | 20 3d 20 28 28 6e 65 77 |..newTop| = ((new|
|00002050| 54 6f 70 2b 33 32 37 36 | 37 29 20 2a 20 77 69 6e |Top+3276|7) * win|
|00002060| 64 52 65 63 74 2e 62 6f | 74 74 6f 6d 29 2f 36 35 |dRect.bo|ttom)/65|
|00002070| 35 33 36 3b 0d 09 6e 65 | 77 4c 65 66 74 20 3d 20 |536;..ne|wLeft = |
|00002080| 28 28 6e 65 77 4c 65 66 | 74 2b 33 32 37 36 37 29 |((newLef|t+32767)|
|00002090| 20 2a 20 77 69 6e 64 52 | 65 63 74 2e 72 69 67 68 | * windR|ect.righ|
|000020a0| 74 29 2f 36 35 35 33 36 | 3b 0d 09 53 65 74 52 65 |t)/65536|;..SetRe|
|000020b0| 63 74 28 26 62 61 6c 6c | 52 65 63 74 2c 20 6e 65 |ct(&ball|Rect, ne|
|000020c0| 77 4c 65 66 74 2c 20 6e | 65 77 54 6f 70 2c 20 6e |wLeft, n|ewTop, n|
|000020d0| 65 77 4c 65 66 74 2b 42 | 61 6c 6c 57 69 64 74 68 |ewLeft+B|allWidth|
|000020e0| 2c 20 6e 65 77 54 6f 70 | 2b 42 61 6c 6c 48 65 69 |, newTop|+BallHei|
|000020f0| 67 68 74 29 3b 0d 09 0d | 09 2f 2a 0d 09 2a 2a 09 |ght);...|./*..**.|
|00002100| 4d 6f 76 65 20 70 65 6e | 20 74 6f 20 74 68 65 20 |Move pen| to the |
|00002110| 6e 65 77 20 6c 6f 63 61 | 74 69 6f 6e 2c 20 61 6e |new loca|tion, an|
|00002120| 64 20 70 61 69 6e 74 20 | 74 68 65 20 63 6f 6c 6f |d paint |the colo|
|00002130| 72 65 64 20 62 61 6c 6c | 2e 0d 09 2a 2f 0d 09 4d |red ball|...*/..M|
|00002140| 6f 76 65 54 6f 28 6e 65 | 77 4c 65 66 74 2c 20 6e |oveTo(ne|wLeft, n|
|00002150| 65 77 54 6f 70 29 3b 0d | 09 50 61 69 6e 74 4f 76 |ewTop);.|.PaintOv|
|00002160| 61 6c 20 28 26 62 61 6c | 6c 52 65 63 74 29 3b 0d |al (&bal|lRect);.|
|00002170| 09 0d 09 2f 2a 0d 09 2a | 2a 09 4d 6f 76 65 20 74 |.../*..*|*.Move t|
|00002180| 68 65 20 70 65 6e 20 74 | 6f 20 74 68 65 20 6d 69 |he pen t|o the mi|
|00002190| 64 64 6c 65 20 6f 66 20 | 74 68 65 20 6e 65 77 20 |ddle of |the new |
|000021a0| 62 61 6c 6c 20 70 6f 73 | 69 74 69 6f 6e 2c 20 66 |ball pos|ition, f|
|000021b0| 6f 72 20 74 68 65 20 74 | 65 78 74 0d 09 2a 2f 0d |or the t|ext..*/.|
|000021c0| 09 4d 6f 76 65 54 6f 28 | 62 61 6c 6c 52 65 63 74 |.MoveTo(|ballRect|
|000021d0| 2e 6c 65 66 74 20 2b 20 | 42 61 6c 6c 57 69 64 74 |.left + |BallWidt|
|000021e0| 68 2f 32 20 2d 20 42 6f | 62 53 69 7a 65 2c 20 0d |h/2 - Bo|bSize, .|
|000021f0| 09 09 62 61 6c 6c 52 65 | 63 74 2e 74 6f 70 20 2b |..ballRe|ct.top +|
|00002200| 20 42 61 6c 6c 48 65 69 | 67 68 74 2f 32 20 2b 20 | BallHei|ght/2 + |
|00002210| 42 6f 62 53 69 7a 65 2f | 32 20 2d 31 29 3b 0d 09 |BobSize/|2 -1);..|
|00002220| 0d 09 2f 2a 09 0d 09 2a | 2a 09 49 6e 76 65 72 74 |../*...*|*.Invert|
|00002230| 20 74 68 65 20 63 6f 6c | 6f 72 20 61 6e 64 20 64 | the col|or and d|
|00002240| 72 61 77 20 74 68 65 20 | 74 65 78 74 20 74 68 65 |raw the |text the|
|00002250| 72 65 2e 20 20 54 68 69 | 73 20 77 6f 6e d5 74 20 |re. Thi|s won.t |
|00002260| 6c 6f 6f 6b 20 71 75 69 | 74 65 20 72 69 67 68 74 |look qui|te right|
|00002270| 20 69 6e 20 31 20 62 69 | 74 0d 09 2a 2a 09 6d 6f | in 1 bi|t..**.mo|
|00002280| 64 65 2c 20 73 69 6e 63 | 65 20 74 68 65 20 66 6f |de, sinc|e the fo|
|00002290| 72 65 67 72 6f 75 6e 64 | 20 61 6e 64 20 62 61 63 |reground| and bac|
|000022a0| 6b 67 72 6f 75 6e 64 20 | 63 6f 6c 6f 72 73 20 77 |kground |colors w|
|000022b0| 69 6c 6c 20 62 65 20 74 | 68 65 20 73 61 6d 65 2e |ill be t|he same.|
|000022c0| 0d 09 2a 2a 09 43 6f 6c | 6f 72 20 51 75 69 63 6b |..**.Col|or Quick|
|000022d0| 44 72 61 77 20 73 70 65 | 63 69 61 6c 20 63 61 73 |Draw spe|cial cas|
|000022e0| 65 73 20 74 68 69 73 20 | 74 6f 20 6e 6f 74 20 69 |es this |to not i|
|000022f0| 6e 76 65 72 74 20 74 68 | 65 20 63 6f 6c 6f 72 2c |nvert th|e color,|
|00002300| 20 74 6f 20 61 76 6f 69 | 64 0d 09 2a 2a 09 69 6e | to avoi|d..**.in|
|00002310| 76 69 73 69 62 6c 65 20 | 64 72 61 77 69 6e 67 2e |visible |drawing.|
|00002320| 0d 09 2a 2f 0d 09 49 6e | 76 65 72 74 43 6f 6c 6f |..*/..In|vertColo|
|00002330| 72 28 26 62 61 6c 6c 43 | 6f 6c 6f 72 29 3b 20 0d |r(&ballC|olor); .|
|00002340| 09 52 47 42 46 6f 72 65 | 43 6f 6c 6f 72 28 26 62 |.RGBFore|Color(&b|
|00002350| 61 6c 6c 43 6f 6c 6f 72 | 29 3b 0d 09 44 72 61 77 |allColor|);..Draw|
|00002360| 53 74 72 69 6e 67 28 22 | 5c 70 42 6f 62 22 29 3b |String("|\pBob");|
|00002370| 0d 7d 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00002380| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00002390| 00 04 4e ba 13 b8 60 32 | 42 67 20 54 2f 10 4e ba |..N...`2|Bg T/.N.|
|000023a0| 13 ac 42 67 20 54 2f 28 | 00 04 4e ba 13 a0 60 1a |..Bg T/(|..N...`.|
|000023b0| 0c 53 69 6c 6c 79 42 61 | 6c 6c 73 2e 63 61 02 00 |.SillyBa|lls.ca..|
|000023c0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 40 |..TEXTMP|S .....@|
|000023d0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 00 40 |..TEXTMP|S .....@|
|000023e0| 00 00 01 b6 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 9e e9 7f 41 00 00 | 22 f3 00 00 01 7e 48 6e |.....A..|"....~Hn|
|00002400| ff ee 2f 3c 00 00 00 01 | a8 80 70 00 2d 40 ff a6 |../<....|..p.-@..|
|00002410| 70 00 2d 40 ff ac 42 67 | 48 6e ff 9a 42 67 4e ba |p.-@..Bg|Hn..BgN.|
|00002420| 14 72 3e 1f 3c 2e ff b0 | 70 00 2d 40 ff 72 2d 6e |.r>.<...|p.-@.r-n|
|00002430| 00 08 ff 78 3d 46 ff 7c | 70 00 2d 40 ff 82 70 00 |...x=F.||p.-@..p.|
|00002440| 2d 40 ff 96 42 67 48 6e | ff 66 42 67 4e ba 14 8c |-@..BgHn|.fBgN...|
|00002450| 3e 1f 3c 2e ff 7c 70 00 | 2d 40 ff a6 70 00 2d 40 |>.<..|p.|-@..p.-@|
|00002460| ff ac 3d 46 ff b0 42 6e | ff b6 42 67 48 6e ff 9a |..=F..Bn|..BgHn..|
|00002470| 42 67 4e ba 14 0c 3e 1f | 38 2e ff c2 3d 44 ff 64 |BgN...>.|8...=D.d|
|00002480| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 09 09 |...H..Mo|naco....|
|00002490| 54 6f 20 64 65 6d 6f 6e | 73 74 72 61 74 65 20 61 |To demon|strate a|
|000024a0| 20 73 69 6d 70 6c 00 06 | 00 04 00 27 00 00 01 df | simpl..|...'....|
|000024b0| 02 30 00 27 00 00 01 df | 02 30 9f 1a 7a e0 00 00 |.0.'....|.0..z...|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|000024d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 05 bb e8 |...L...L|...2....|
|000024e0| 04 c8 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000024f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+